package com.fanli.staff.Service.Imlp;

import com.fanli.staff.Service.SatffService;
import com.fanli.staff.mapper.StaffMapper;
import com.fanli.staff.pojo.Staff;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class StaffServiceImlp implements SatffService {
    @Autowired
    private StaffMapper mapper;

    @Override
    public List<Staff> selectAll() {
        return mapper.selectAll();
    }

    @Override
    public Staff selectById(Integer id) {
        System.out.println("查询"+id);
        return mapper.selectById(id);
    }

    @Override
    public void save(Staff staff) {
        mapper.save(staff);
    }

    @Override
    public void update(Staff staff) {
        System.out.println("更新"+staff);
        mapper.update(staff);
    }

    @Override
    public void delete(Integer id) {
        System.out.println("删除"+id);
        mapper.delete(id);
    }
}
